<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page trimDirectiveWhitespaces="true" %>
<%@ taglib uri="/struts-tags" prefix="s" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<base href="<%=basePath%>">
 		<title></title>
		<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
		<meta http-equiv="description" content="This is my page">
		<jsp:include page="/page/front/include.jsp"></jsp:include>
		<link rel="stylesheet" type="text/css" href="css/front/user_center.css" />
		<script type="text/javascript" src="js/front/order.js"></script>
	</head>
	<body class="memberCenter">
		<jsp:include page="/page/front/header.jsp"></jsp:include>
		<div class="body orderList">
			<div class="bodyLeft">
				<jsp:include page="/page/front/user_left_menu.jsp"></jsp:include>
			</div>
			<div class="bodyRight">
				<div class="memberCenterDetail">
					<div class="top">订单列表</div>
					<div class="middle">
						<div class="blank"></div>
						<table class="listTable">
							<tbody>
								<tr>
									<th style="width:10px;"></th>
									<th style="width:150px;"><center>订单号</center></th>
									<th style="width:100px;">收货人</th>
									<th style="width:150px;">下单时间</th>
									<th style="width:150px;">订单金额</th>
									<th style="width:75px;">订单状态</th>
									<th>操作</th>
								</tr>
								<s:subset source="#session.orders" count="10">
									<s:iterator>
										<s:set name="orderID" value="value.orderID"></s:set>
								<tr class="orderInfo">
									<td><a><img src="img/front/+.bmp"></img></a></td>
									<td>
										<center><a href='viewOrder.do?id=<s:property value="#orderID" />'>
											<s:property value="#orderID" />
										</a></center>
									</td>
									<td><s:property value="#session.ordersAddress.get(#orderID)[0]" /></td>
									<td><s:property value="value.submitTime" /></td>
									<td>￥<s:property value="value.charge" />元 </td>
									<td>
										<s:set name="status" value="value.status"></s:set>
										<s:if test="#status==0">
										[已提交]
										</s:if><s:elseif test="#status==1">
										[已取消]
										</s:elseif><s:elseif test="#status==2">
										[已发货]
										</s:elseif><s:elseif test="#status==3">
										[已完成]
										</s:elseif><s:else>
										[已失败]
										</s:else>
									</td>
									<td></td>
								</tr>
								<tr class="orderBooks">
									<td></td>
									<td colspan="6">
										<s:subset source="#session.ordersBooks.get(#orderID)" count="8">
											<s:iterator>
										<a href='viewBook.do?id=<s:property value="book.bookID" />' target="_blank">
											<img src='<s:property value="book.picPath" />' class="orderBook" />
										</a>
											</s:iterator>
										</s:subset>
									<a class="orderMore" href='viewOrder.do?id=<s:property value="value.orderID" />'>更多&gt;</a>
									</td>
								</tr>
									</s:iterator>
								</s:subset>
							</tbody>
						</table>
						<div class="blank"></div>
						<jsp:include page="/page/front/pager.jsp"></jsp:include>
					</div>
					<div class="bottom"></div>
				</div>
			</div>
		</div>
		<jsp:include page="/page/front/footer.jsp"></jsp:include>
	</body>
</html>
